<<<<<<< HEAD
axios.defaults.baseURL = 'http://124.223.14.236:8060/admin'
// 对发送请求时候的headers优化
axios.defaults.baseURL=
axios.interceptors.request.use(config => {
    //  console.log(config)
    //  console.log(config.url)

    config.headers.Authorization = localStorage.getItem('x-token')

    return config;
}, error => {

    return Promise.reject(error);
});
// 响应拦截器 响应时若身份没有认证成功跳转到登录页面
axios.interceptors.response.use(response => {
    //  console.log(response);
    if (response.data.status === 1 && response.data.message === '身份认证失败！') {
        location.href = '/youdianda_static/index.html'
    }
    return response;
}, error => {
    return Promise.reject(error);
});
=======
axios.interceptors.request.use(config => {
	config.headers['X-Token'] = localStorage.getItem('x-token')
	return config;
}, error => {
	return Promise.reject(error);
});
>>>>>>> 0b2906d (基本完成两个页面功能)
